@include('Admin.public.head')
<style type="text/css">
    #my-popup {
        max-height: 530px;
    }

    #my-popup2 {
        max-height: 700px;
        overflow: auto;
    }

    #my-popup5 {
        max-height: 475px;
        overflow: auto;
    }

    #credit2_see a {
        background: #e4a25e;
        border: 1px solid #e4a25e;
    }

    #my-popup3 {
        overflow: auto;
        max-height: 533px;
    }

    #package-p {
        width: 60%;
        margin-left: 24%;
        margin-top: 4px;
        font-size: 16px;
    }

    #package-p span {
        margin-right: 15px;
    }

    .packpay p {
        margin-left: 25%;
        margin-top: 38px;
    }

    #package-p .full-span {
        color: red;
    }

    #full-zuo {
        width: 26.5%;
    }

    #package-am {
        max-height: 398px;
    }

    #pack-form-group {
        margin-bottom: 10px;
    }

    #packadr-form-group {
        margin-bottom: 15px;
    }

    .packages {
        margin-bottom: 10px;
    }

    #unfullMoney {
        background-color: #c0c4cc;
        border-color: #c0c4cc;
    }

    .packpay p span {
        color: #f56c6c;
        margin-left: 20px;
        font-size: 16px;
    }

    .tjlanmu .zuo {
        text-align: left;
    }

    .wrapper {
        width: 100%;
        background-color: #fb4818;
        margin: 0 auto;
        height: 120px;
        border-radius: 10px;
        color: #ffffff;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 20px;
    }

    .wrapper h3 {
        font-size: 14px;
        line-height: 32px;
    }

    .wrapper h4 {
        margin: 20px 0;
        /*padding: 6px 0;*/
        font-size: 20px;
    }

    #my-popup6 {
        overflow: scroll;
        background-color: #f8f8f8;
    }

    #my-popup6 i {
        font-style: normal;
    }

    #my-popup6 span {
        font-size: 14px;
    }

    #my-popup6 .red2 {
        color: #ec2c2f;
    }

    #my-popup6 .am-list {
        background-color: #f8f8f8;
    }

    #my-popup6 .am-list li {
        border: none;
        background-color: transparent;
    }

    #my-popup6 .am-list li a {
        color: #555;
    }

    #my-popup6 .am-list li img {
        width: 20px;
        height: auto;
    }

    #my-popup6 #package-p {
        width: 80%;
    }
</style>
<body>
@include('Admin.public.menu')
<div class=" admin-content" id="app">
    {{ csrf_field() }}
    <div class="daohang">

    </div>
    <!--添加模态框-->
    <div class="am-popup am-popup-inner" id="my-popup">
        <div class="am-popup-hd">
            <h4 class="am-popup-title">添加会员</h4>
            <span data-am-modal-close
                  class="am-close">&times;</span>
        </div>
        <div class="am-popup-bd">
            <form class="am-form tjlanmu">
                <div class="am-form-group am-cf">
                    <div class="zuo">手机号：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="members.phone" placeholder="请输入手机号">
                        <!-- <p class="am-form-help">会员等级</p> -->
                    </div>
                </div>
                <div class="am-form-group am-cf">
                    <div class="zuo">密码：</div>
                    <div class="you">
                        <input type="password" class="am-form-field" v-model="members.password" placeholder="请输入密码">
                        <!-- <p class="am-form-help">密码</p> -->
                    </div>
                </div>

                <div class="am-form-group am-cf">
                    <div class="zuo">确认密码：</div>
                    <div class="you">
                        <input type="password" class="am-form-field" v-model="members.repasswprd" placeholder="请输入确认密码">
                        <!-- <p class="am-form-help">确认密码</p> -->
                    </div>
                </div>

                <div class="am-form-group am-cf">
                    <div class="zuo">姓名：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="members.user_name" placeholder="请输入姓名">
                        <!-- <p class="am-form-help">密码</p> -->
                    </div>
                </div>

                <div class="am-form-group am-cf">
                    <div class="zuo">分享人：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="members.referrer" placeholder="请输入分享人">
                        <!-- <p class="am-form-help">密码</p> -->
                    </div>
                </div>

                <div class="am-form-group am-cf">
                    <div class="zuo">接点人：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="members.nodes" placeholder="请输入接点人">
                        <!-- <p class="am-form-help">密码</p> -->
                    </div>
                </div>

                <div class="am-form-group am-cf">
                    <div class="zuo">公司类型：</div>
                    <div class="you" style="margin-top: 3px;">
                        <!--是否是公司-->
                        @if(Auth::user()->is_branch==0)
                            <select v-model="members.company_id">
                                <option value="0">请选择</option>
                                <option v-for="val in companyList" :value="val.id">@{{ val.name }}</option>
                                <!--  <option value="option2" value="1">分公司</option> -->
                            </select>
                        @else
                            <select v-model="members.company_id">
                                <option v-for="val in companyList" :value="val.id">@{{ val.name }}</option>
                                <!--  <option value="option2" value="1">分公司</option> -->
                            </select>
                        @endif
                    </div>
                    <span class="am-form-caret"></span>
                </div>


                <div class="am-form-group am-cf">
                    <div class="zuo">接点区域：</div>
                    <div class="you" style="margin-top: 3px;">
                        <label class="am-checkbox-inline">
                            <input type="radio" value="A" v-model="members.area" data-am-ucheck=""
                                   class="am-ucheck-radio">
                            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i
                                        class="am-icon-checked"></i></span>A
                        </label>
                        <label class="am-checkbox-inline">
                            <input type="radio" value="B" v-model="members.area" data-am-ucheck=""
                                   class="am-ucheck-radio">
                            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i
                                        class="am-icon-checked"></i></span>B
                        </label>
                    </div>
                </div>


                <div class="am-form-group am-cf">
                    <div class="you">
                        <p>
                            <button type="button" v-on:click="addUsers()" class="am-btn am-btn-success am-radius">立即添加
                            </button>
                            <button type="reset" class="am-btn am-btn-success am-radius">重新填写</button>

                        </p>
                    </div>
                </div>
            </form>
        </div>

    </div>
    <!--修改模态框-->
    <div class="am-popup am-popup-inner" id="my-popup2">
        <div class="am-popup-hd">
            <h4 class="am-popup-title">修改会员资料</h4>
            <span data-am-modal-close
                  class="am-close">&times;</span>
        </div>
        <div class="am-popup-bd" style="max-height:320px;">
            <form class="am-form tjlanmu">
                <div class="am-form-group am-cf">
                    <div class="zuo">会员账号：</div>
                    <div class="you">
                        <input  type="text" class="am-form-field" v-model="memberDetail.name">
                        <!-- <p class="am-form-help">会员等级</p> -->
                    </div>
                </div>
                <div class="am-form-group am-cf">
                    <div class="zuo">姓名：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="memberDetail.user_name" placeholder="请输入姓名">
                        <!-- <p class="am-form-help">会员等级</p> -->
                    </div>
                </div>

                <div class="am-form-group am-cf">
                    <div class="zuo">绑定手机号：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="memberDetail.phone" placeholder="请输入绑定手机号">
                        <!-- <p class="am-form-help">会员等级</p> -->
                    </div>
                </div>

                <!--                 <div class="am-form-group am-cf">
                <div class="zuo">宝励入股金额：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="memberDetail.equity_price2" placeholder="请输入入股金额">
                    </div>
                </div>
                <div class="am-form-group am-cf">
                    <div class="zuo">DT入股金额：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="memberDetail.equity_price" placeholder="请输入入股金额">
                    </div>
                </div> -->

{{--                <div class="am-form-group am-cf">--}}
{{--                    <!-- <div class="zuo">微商城等级：</div> -->--}}
{{--					<div class="zuo">用户等级：</div>--}}
{{--                    <div class="you" style="margin-top: 3px;">--}}
{{--                        <select v-model="memberDetail.level">--}}
{{--                            <option v-for="val in ExShop" :value="val.id">@{{ val.level_name }}</option>--}}
{{--                            <!--  <option value="option2" value="1">分公司</option> -->--}}
{{--                        </select>--}}
{{--                    </div>--}}
{{--                    <span class="am-form-caret"></span>--}}
{{--                </div>--}}
                <div class="am-form-group am-cf">
                    <div class="zuo">份额：</div>
                    <div class="you">
                        <input type="number" class="am-form-field" v-model="memberDetail.voucher" placeholder="请输入份额值">
                        <!-- <p class="am-form-help">会员等级</p> -->
                    </div>
                </div>
				<div class="am-form-group am-cf">
				    <div class="zuo">分享人姓名：</div>
				    <div class="you">
				        <input disabled="disabled" type="text" class="am-form-field" v-model="memberDetail.feferrer_name">
				        <!-- <p class="am-form-help">会员等级</p> -->
				    </div>
				</div>
				
				<div class="am-form-group am-cf">
				    <div class="zuo">分享人号码：</div>
				    <div class="you">
				        <input disabled="disabled" type="text" class="am-form-field" v-model="memberDetail.referrer_phone">
				        <!-- <p class="am-form-help">会员等级</p> -->
				    </div>
				</div>
				
				<div class="am-form-group am-cf">
				    <!-- <div class="zuo">微商城等级：</div> -->
					<div class="zuo">收货地址：</div>
				    <div class="you" style="margin-top: 3px;">
				        <select>
				            <option v-for="val in memberDetail.address" :value="val.id">@{{ val.province }}@{{ val.city }}@{{ val.district }}@{{ val.address }}</option>
				            <!--  <option value="option2" value="1">分公司</option> -->
				        </select>
				    </div>
				    <span class="am-form-caret"></span>
				</div>
				
			   <!-- 后期可能需要-->
               <!-- <div class="am-form-group am-cf">
                    <div class="zuo">超级商城等级：</div>
                    <div class="you" style="margin-top: 3px;">
                        <select v-model="memberDetail.super_level">
                            <option v-for="val in ExShop" :value="val.id">@{{ val.vip_name }}</option>
                             <option value="option2" value="1">分公司</option>
                        </select>
                    </div>
                    <span class="am-form-caret"></span>
                </div> -->                                                  
                {{--<div class="am-form-group am-cf">--}}
                {{--<div class="zuo">直商城开关：</div>--}}
                {{--<div class="you" style="margin-top: 3px;">--}}
                {{--<el-switch--}}
                {{--v-model="value2"--}}
                {{--@change="changeStraightShop(memberDetail.uid)">--}}
                {{--</el-switch>--}}
                {{--</div>--}}
                {{--</div>--}}
				
				<!-- 后期可能需要 -->
                <!-- <div class="am-form-group am-cf">
                    <div class="zuo">超级商城开关：</div>
                    <div class="you" style="margin-top: 3px;">
                        <el-switch
                                v-model="value3"
                                @change="changeIsdown(memberDetail.uid)">
                        </el-switch>
                    </div>
                </div> -->
                <!-- <div class="am-form-group am-cf">
                    <div class="zuo">超级商城分离：</div>
                    <div class="you" style="margin-top: 3px;">
                        <el-switch
                                v-model="value5"
                                @change="changeSuper(memberDetail.uid)">
                        </el-switch>
                    </div>
                </div> -->

                <!--                 <div class="am-form-group am-cf">
                <div class="zuo">宝励股东开关：</div>
                    <div class="you" style="margin-top: 3px;">
                        <label class="am-checkbox-inline">
                            <input type="radio" value="1" v-model="memberDetail.shareholder" data-am-ucheck=""
                                   class="am-ucheck-radio">
                            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i
                                        class="am-icon-checked"></i></span>开
                        </label>
                        <label class="am-checkbox-inline">
                            <input type="radio" value="0" v-model="memberDetail.shareholder" data-am-ucheck=""
                                   class="am-ucheck-radio">
                            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i
                                        class="am-icon-checked"></i></span>关
                        </label>
                    </div>
                </div>
                <div class="am-form-group am-cf">
                    <div class="zuo">DT股东开关：</div>
                    <div class="you" style="margin-top: 3px;">
                        <label class="am-checkbox-inline">
                            <input type="radio" value="1" v-model="memberDetail.DT_shareholder" data-am-ucheck=""
                                   class="am-ucheck-radio">
                            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i
                                        class="am-icon-checked"></i></span>开
                        </label>
                        <label class="am-checkbox-inline">
                            <input type="radio" value="0" v-model="memberDetail.DT_shareholder" data-am-ucheck=""
                                   class="am-ucheck-radio">
                            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i
                                        class="am-icon-checked"></i></span>关
                        </label>
                    </div>
                </div> -->


                <div class="am-form-group am-cf">
                    <div class="zuo">提现开关：</div>
                    <div class="you" style="margin-top: 3px;">
                        <label class="am-checkbox-inline">
                            <input type="radio" value="1" v-model="memberDetail.is_withdraw" data-am-ucheck=""
                                   class="am-ucheck-radio">
                            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i
                                        class="am-icon-checked"></i></span>开
                        </label>
                        <label class="am-checkbox-inline">
                            <input type="radio" value="0" v-model="memberDetail.is_withdraw" data-am-ucheck=""
                                   class="am-ucheck-radio">
                            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i
                                        class="am-icon-checked"></i></span>关
                        </label>
                    </div>
                </div>

                <div class="am-form-group am-cf">
                    <div class="zuo">转账开关：</div>
                    <div class="you" style="margin-top: 3px;">
                        <label class="am-checkbox-inline">
                            <input type="radio" value="1" v-model="memberDetail.is_shift" data-am-ucheck=""
                                   class="am-ucheck-radio">
                            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i
                                        class="am-icon-checked"></i></span>开
                        </label>
                        <label class="am-checkbox-inline">
                            <input type="radio" value="0" v-model="memberDetail.is_shift" data-am-ucheck=""
                                   class="am-ucheck-radio">
                            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i
                                        class="am-icon-checked"></i></span>关
                        </label>
                    </div>
                </div>
{{--				<div class="am-form-group am-cf">--}}
{{--				    <div class="zuo">团队收益：</div>--}}
{{--				    <div class="you" style="margin-top: 3px;">--}}
{{--				        <label class="am-checkbox-inline">--}}
{{--				            <input type="radio" value="1" v-model="memberDetail.team_profit" data-am-ucheck=""--}}
{{--				                   class="am-ucheck-radio">--}}
{{--				            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i--}}
{{--				                        class="am-icon-checked"></i></span>开--}}
{{--				        </label>--}}
{{--				        <label class="am-checkbox-inline">--}}
{{--				            <input type="radio" value="0" v-model="memberDetail.team_profit" data-am-ucheck=""--}}
{{--				                   class="am-ucheck-radio">--}}
{{--				            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i--}}
{{--				                        class="am-icon-checked"></i></span>关--}}
{{--				        </label>--}}
{{--				    </div>--}}
{{--				</div>--}}
				<div class="am-form-group am-cf">
				    <div class="zuo">份额分红：</div>
				    <div class="you" style="margin-top: 3px;">
				        <label class="am-checkbox-inline">
				            <input type="radio" value="1" v-model="memberDetail.platform_profit" data-am-ucheck=""
				                   class="am-ucheck-radio">
				            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i
				                        class="am-icon-checked"></i></span>开
				        </label>
				        <label class="am-checkbox-inline">
				            <input type="radio" value="0" v-model="memberDetail.platform_profit" data-am-ucheck=""
				                   class="am-ucheck-radio">
				            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i
				                        class="am-icon-checked"></i></span>关
				        </label>
				    </div>
				</div>
{{--                <div class="am-form-group am-cf">--}}
{{--                    <div class="zuo">阅读资格：</div>--}}
{{--                    <div class="you" style="margin-top: 3px;">--}}
{{--                        <label class="am-checkbox-inline">--}}
{{--                            <input type="radio" value="1" v-model="memberDetail.is_read" data-am-ucheck=""--}}
{{--                                   class="am-ucheck-radio">--}}
{{--                            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i--}}
{{--                                        class="am-icon-checked"></i></span>是--}}
{{--                        </label>--}}
{{--                        <label class="am-checkbox-inline">--}}
{{--                            <input type="radio" value="0" v-model="memberDetail.is_read" data-am-ucheck=""--}}
{{--                                   class="am-ucheck-radio">--}}
{{--                            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i--}}
{{--                                        class="am-icon-checked"></i></span>否--}}
{{--                        </label>--}}
{{--                    </div>--}}
{{--                </div>--}}
                <div class="am-form-group am-cf">
                    <div class="zuo">是否激活：</div>
                    <div class="you" style="margin-top: 3px;">
                        <label class="am-checkbox-inline">
                            <input type="radio" value="1" v-model="memberDetail.registered" data-am-ucheck=""
                                   class="am-ucheck-radio">
                            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i
                                        class="am-icon-checked"></i></span>已激活
                        </label>
                        <label class="am-checkbox-inline">
                            <input type="radio" value="0" v-model="memberDetail.registered" data-am-ucheck=""
                                   class="am-ucheck-radio">
                            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i
                                        class="am-icon-checked"></i></span>未激活
                        </label>
                    </div>
                </div>
				
				<!-- 后期可能需要 -->
                <!-- <div class="am-form-group am-cf">
                    <div class="zuo">复投状态：</div>
                    <div class="you" style="margin-top: 3px;">
                        <span v-if="memberDetail.is_credit3 >=3 ">复投</span>
                        <span v-if="memberDetail.is_credit3 <3 ">正常</span>
                    </div>
                </div> -->

                <div class="am-form-group am-cf" v-if="memberDetail.stores_number != '0'">
                    <div class="zuo">重置门店编号：</div>
                    <div class="you" style="margin-top: 3px;">
                        <span style="cursor: pointer;" v-on:click="storeDel( memberDetail.uid )">点击重置</span>

                    </div>
                </div>


                <div class="am-form-group am-cf">
                    <div class="you">
                        <p>
                            <button type="button" v-on:click="editMember(memberDetail.uid)"
                                    class="am-btn am-btn-success am-radius">立即修改
                            </button>
                            <button type="reset" class="am-btn am-btn-success am-radius">重新填写</button>
                        </p>
                    </div>
                </div>
            </form>
        </div>
    </div>
   
     <!-- 业绩模态框 -->
	 <div class="am-popup am-popup-inner" id="my-popup8" style="max-height: 530px;">
	     <div class="am-popup-hd">
	         <h4 class="am-popup-title">会员业绩</h4>
	         <span data-am-modal-close
	               class="am-close">&times;</span>
	     </div>
	     <div class="am-popup-bd" style="max-height:485px;">
	         <form class="am-form tjlanmu1">
	             <div class="am-form-group am-cf">
	                 <div class="zuo1">姓名：</div>
	                 <div class="you1">
	                     <input type="text" class="am-form-field" v-model="memberDetail.user_name" placeholder="请输入姓名">
	                     <!-- <p class="am-form-help">会员等级</p> -->
	                 </div>
	             </div>
				 
				 <div class="am-form-group am-cf">
				     <div class="zuo1">个人参与总局数：</div>
				     <div class="you1">
				         <input type="text" class="am-form-field" v-model="memberDetail.day_times">
				     </div>
				 </div>
				 
				 <div class="am-form-group am-cf">
				     <div class="zuo1">个人中奖业绩：</div>
				     <div class="you1">
				         <input type="text" class="am-form-field" v-model="memberDetail.single_achievement">
				     </div>
				 </div>
				 
				 <div class="am-form-group am-cf">
				     <div class="zuo1">个人当日中奖业绩：</div>
				     <div class="you1">
				         <input type="text" class="am-form-field" v-model="memberDetail.day_achievement">
				     </div>
				 </div>
				 
				 <div class="am-form-group am-cf">
				     <div class="zuo1">团队业绩：</div>
				     <div class="you1">
				         <input type="text" class="am-form-field" v-model="memberDetail.team_achievement">
				     </div>
				 </div>
				 
				 <div class="am-form-group am-cf">
				     <div class="zuo1">团队新增业绩：</div>
				     <div class="you1">
				         <input type="text" class="am-form-field" v-model="memberDetail.achievement_increment">
				     </div>
				 </div>
				 
				 <div class="am-form-group am-cf">
				     <div class="zuo1">团队总参与局数：</div>
				     <div class="you1">
				         <input type="text" class="am-form-field" v-model="memberDetail.team_numbers">
				     </div>
				 </div>
				 
	         </form>
	     </div>
	 </div>
   
   
	<!--充值模态框-->
    <div class="am-popup am-popup-inner" id="my-popup3">
        <div class="am-popup-hd">
            <h4 class="am-popup-title">会员货币充值</h4>
            <span data-am-modal-close class="am-close">&times;</span></div>
        <div class="am-popup-bd" style="max-height:auto;">
            <form class="am-form tjlanmu">
                <div class="am-form-group am-cf">
                    <div class="zuo">用户名：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="memberDetail.name" disabled="disabled">
                        <!-- <p class="am-form-help">会员等级</p> -->
                    </div>
                </div>
                <div class="am-form-group am-cf">
                    <div class="zuo">电子积分：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="memberPrepay.credit1" placeholder="请输入">
                        <p class="am-form-help" style="color:red">充值电子积分：@{{ Zcredit1}}</p>
                        <p class="am-form-help" style="color:red">当前电子积分：@{{ memberDetail.credit1}}</p>
                    </div>
                </div>

                <div class="am-form-group am-cf">
                    <div class="zuo">奖励积分：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="memberPrepay.credit2" placeholder="请输入">
                        <p class="am-form-help" style="color:red">充值奖励积分：@{{ Zcredit2}}</p>
                        <p class="am-form-help" style="color:red">当前奖励积分：@{{ memberDetail.credit2}}</p>
                    </div>
                </div>
                <!-- <div class="am-form-group am-cf">
                    <div class="zuo">积分：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="memberPrepay.voucher" placeholder="请输入">
                        <p class="am-form-help" style="color:red">充值金额：@{{ Zvoucher}}</p>
                        <p class="am-form-help" style="color:red">当前积分：@{{ memberDetail.voucher}}</p>
                    </div>
                </div> -->
                <!-- <div class="am-form-group am-cf">
                    <div class="zuo">积分：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="memberPrepay.credit4" placeholder="请输入">
                        <p class="am-form-help" style="color:red">充值金额：@{{ Zcredit4}}</p>
                        <p class="am-form-help" style="color:red">当前余额：@{{ memberDetail.credit4}}</p>
                    </div>
                </div> -->
                <!-- <div class="am-form-group am-cf">
                    <div class="zuo">启动金：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="memberPrepay.credit6" placeholder="请输入">
                        <p class="am-form-help" style="color:red">充值金额：@{{ Zcredit6}}</p>
                        <p class="am-form-help" style="color:red">当前余额：@{{ memberDetail.credit6}}</p>
                    </div>
                </div> -->
                <div class="am-form-group am-cf">
                    <div class="zuo">备注：</div>
                    <p id="package-p" style="margin-bottom: 15px;">
                        <textarea cols="15" rows="4"  style="width: 133%;margin-left: -20px;" v-model="memberPrepay.remark" ></textarea>
                    </p>
                </div>
                <div class="am-form-group am-cf">
                    <div class="you">
                        <p>
                            <button type="button" v-on:click="addRepay(memberDetail.uid)"
                                    class="am-btn am-btn-success am-radius">增加货币
                            </button>
                            <button type="button" v-on:click="minusRepay(memberDetail.uid)"
                                    class="am-btn am-btn-success am-radius">减少货币
                            </button>
                        </p>
                    </div>
                </div>
            </form>
        </div>
    </div>
    {{--    限时购业绩--}}
    <div class="am-popup am-popup-inner" id="my-popup10">
        <div class="am-popup-hd">
            <h4 class="am-popup-title">限时购业绩</h4>
            <span data-am-modal-close class="am-close">&times;</span></div>
        <div class="am-popup-bd" style="max-height:320px;">
            <div class="wrapper">
                <div>
                    <h3>限时购个人业绩</h3>
                    <h4>@{{ earningNum }}盒</h4>
                </div>
            </div>
            <div class="wrapper" v-if="earningDnum">
                <div>
                    <h3>限时购公司业绩</h3>
                    <h4>@{{ earningDnum }}盒</h4>
                </div>
            </div>
        </div>
    </div>
    <!--购买礼包模态框-->
    <div class="am-popup am-popup-inner" id="my-popup5">
        <div class="am-popup-hd">
            <h4 class="am-popup-title">礼包购买</h4>
            <span data-am-modal-close class="am-close">&times;</span></div>
        <div class="am-popup-bd" id="package-am">
            <form class="am-form tjlanmu">
                <div class="am-form-group am-cf" id="pack-form-group">
                    <div class="zuo">礼包信息：</div>
                    <p id="package-p">
                        <span>名称:@{{ packAgeData.goodsname}}</span>
                        <span>价格:@{{ packAgeData.memberprice}}</span>
                        <span>运费:@{{ packAgeData.freight}}</span>
                    </p>
                </div>
                <div class="am-form-group am-cf" id="packadr-form-group">
                    <div class="zuo">是否自提：</div>
                    <p id="package-p">
                        <label class="am-radio-inline">
                            <input type="radio" v-model="pickSelf" value="1" name="docInlineRadio"> 是
                        </label>
                        <label class="am-radio-inline">
                            <input type="radio" name="docInlineRadio" v-model="pickSelf" value="0" checked> 否
                        </label>
                    </p>
                </div>
                <div class="am-form-group am-cf" id="packadr-form-group">
                    <div class="zuo">地址选择：</div>
                    <p id="package-p" v-for="val in memberAllAdress" :data-id="val.id">
                        <input type="radio" v-if="val.default == 1" checked name="default" :value="val.id"/>
                        <input type="radio" v-if="val.default == 0" name="default" :value="val.id"/>
                        @{{ val.name }} @{{ val.phone }} @{{ val.province }}@{{ val.city }}@{{ val.district }}@{{
                        val.address }}
                    </p>
                </div>
                <div class="am-form-group am-cf" id="packadr-form-group">
                    <div class="zuo">添加地址：</div>
                    <div id="package-p">
                        <button type="button" v-on:click="timeAddress(5)" class="am-btn am-btn-success am-radius"
                        >添加地址
                        </button>
                    </div>
                </div>
                <div class="am-form-group am-cf packages">
                    <div class="zuo">支付方式：</div>
                    <p id="package-p">
                        <span>代金券/电子币/奖金币</span>
                    </p>
                </div>
                <div class="am-form-group am-cf packages">
                    <div class="zuo">支付金额：</div>
                    <p id="package-p">
                        <span class="full-span">@{{pickSelf=='1'?packageMemberprice:packagePayAll  }}</span>
                    </p>
                </div>
                <div class="am-form-group am-cf packages">
                    <div class="zuo" id="full-zuo">可用电子币余额：</div>
                    <p id="package-p">
                        <span class="full-span">@{{ thisMembercredit1 }}</span>
                    </p>
                </div>
                <div class="am-form-group am-cf packages">
                    <div class="zuo" id="full-zuo">可用奖金币金额：</div>
                    <p id="package-p">
                        <span class="full-span">@{{ thisMembercredit2 }}</span>
                    </p>
                </div>
                <div class="am-form-group am-cf packages">
                    <div class="zuo" id="full-zuo">可用代金券金额：</div>
                    <p id="package-p">
                        <span class="full-span">@{{ thisMembervoucher }}</span>
                    </p>
                </div>
                <div class="am-form-group am-cf packages">
                    <div class="zuo">备注：</div>
                    <p id="package-p">
                        <textarea cols="10" rows="4" id="packRemark"></textarea>
                    </p>
                </div>
                <div class="am-form-group am-cf">
                    <div class="you packpay">
                        <p v-if="isFullMoney == 1">
                            <button type="button" v-on:click="packageBuy()" class="am-btn am-btn-success am-radius">
                                立即购买
                            </button>
                        </p>
                        <p v-if="isFullMoney == 0">
                            <button type="button" v-on:click="packageBuy()" class="am-btn am-btn-success am-radius"
                                    id="unfullMoney">立即购买
                            </button>
                            <span>余额不足</span>
                        </p>
                    </div>
                </div>
            </form>
        </div>
    </div>


    <!--限时购模态框-->
    <div class="am-popup am-popup-inner" id="my-popup6">
        <div class="am-popup-hd">
            <h4 class="am-popup-title">升单</h4>
            <span data-am-modal-close class="am-close">&times;</span></div>
        <div class="am-popup-bd" id="package-am">
            <form class="am-form tjlanmu">
                <div class="am-form-group am-cf" id="packadr-form-group">
                    <div class="zuo">选择商品：</div>
                    <div id="package-p">
                        <select id="doc-select-1" style="font-size: 12px" v-model="timeData">
                            <option value="">请选择你要购买的商品</option>
                            <option v-for="val in timeDataArray " :value="val">@{{
                                val.goodsname }}
                            </option>
                        </select>
                    </div>
                </div>
                <!-- <div class="am-form-group am-cf" id="packadr-form-group">
                    <div class="zuo">是否自提：</div>
                    <p id="package-p">
                        <label class="am-radio-inline">
                            <input type="radio" v-model="pickSelf" value="1" name="docInlineRadio"> 是
                        </label>
                        <label class="am-radio-inline">
                            <input type="radio" name="docInlineRadio" v-model="pickSelf" value="0" checked> 否
                        </label>
                    </p>
                </div> -->
                <!-- <div class="am-form-group am-cf" id="packadr-form-group">
                    <div class="zuo">单价：</div>
                    <p id="package-p">
                        <input type="number" value="请输入商品单价" v-model="timeData.originalprice"/>
                    </p>
                </div>
                <div class="am-form-group am-cf" id="packadr-form-group">
                    <div class="zuo">数量：</div>
                    <p id="package-p">
                        <input type="number" value="请输入商品数量" v-model="num"/>
                    </p>
                </div>
                <div class="am-form-group am-cf" id="packadr-form-group">
                    <div class="zuo">运费：</div>
                    <p id="package-p">
                        <input type="number" v-model="freights" :placeholder="freight"/>
                    </p>
                </div> -->
                <div class="am-form-group am-cf" id="packadr-form-group">
                    <div class="zuo">收货地址：</div>
                    <div id="package-p">
                        <select id="doc-select-1" style="font-size: 12px" v-model="timeTed.address">
                            <option v-for="val in timeTedData " :value="val.id">@{{
                                val.name+val.phone+val.province+val.city+val.district+val.address }}
                            </option>
                        </select>
                    </div>
                </div>

                {{--                <div class="am-form-group am-cf" id="packadr-form-group">--}}
                {{--                    <div class="zuo">订单信息：</div>--}}
                {{--                    <p id="package-p">--}}
                {{--                        <span>总数量:<i class="red2">@{{ num }}</i></span>--}}
                {{--                        <span>邮费:<i class="red2">@{{ freight }}</i></span>--}}
                {{--                    </p>--}}
                {{--                </div>--}}
                <div class="am-form-group am-cf packages">
                    <div class="zuo">备注：</div>
                    <p id="package-p">
                        <textarea cols="10" rows="4" v-model="timeTed.remark"></textarea>
                    </p>
                </div>
                <div class="am-form-group am-cf" id="packadr-form-group">
                    <div class="zuo">添加地址：</div>
                    <div id="package-p">
                        <button type="button" v-on:click="timeAddress(6)" class="am-btn am-btn-warning am-radius"
                        >添加地址
                        </button>
                    </div>
                </div>
                <div class="am-form-group am-cf">
                    <div class="you packpay">
                        <p>
                            <button type="button" v-on:click="timeBuy()" class="am-btn am-btn-success am-radius"
                            >立即购买
                            </button>
                        </p>
                    </div>
                </div>
            </form>
        </div>
    </div>


    <!--添加收货地址-->
    <div class="am-popup am-popup-inner" id="my-popup7" data-toggle="distpicker" style="max-height: 515px">
        <div class="am-popup-hd">
            <h4 class="am-popup-title">收货地址</h4>
            <span data-am-modal-close class="am-close">&times;</span></div>
        <div class="am-popup-bd" id="package-am">
            <form class="am-form tjlanmu">
                <div class="am-form-group am-cf" id="packadr-form-group">
                    <div class="zuo">省份：</div>
                    <div id="package-p">
                        <select id="province1" v-model="address.province" required>
                        </select>
                    </div>
                </div>
                <div class="am-form-group am-cf" id="packadr-form-group">
                    <div class="zuo">市区：</div>
                    <div id="package-p">
                        <select class="form-control" id="city1" v-model="address.city" required>
                        </select>
                    </div>
                </div>
                <div class="am-form-group am-cf" id="packadr-form-group">
                    <div class="zuo">区县：</div>
                    <div id="package-p">
                        <select class="form-control" id="district1" v-model="address.district">
                        </select>
                    </div>
                </div>
                <div class="am-form-group am-cf" id="packadr-form-group">
                    <div class="zuo">详细地址：</div>
                    <p id="package-p">
                        <input type="text" value="请输入商品数量" v-model="address.address"/>
                    </p>
                </div>
                <div class="am-form-group am-cf" id="packadr-form-group">
                    <div class="zuo">收货姓名：</div>
                    <p id="package-p">
                        <input type="text" value="请输入商品数量" v-model="address.name"/>
                    </p>
                </div>
                <div class="am-form-group am-cf" id="packadr-form-group">
                    <div class="zuo">手机号码：</div>
                    <p id="package-p">
                        <input type="text" value="请输入商品数量" v-model="address.phone"/>
                    </p>
                </div>
                <div class="am-form-group am-cf">
                    <div class="you packpay">
                        <p>
                            <button type="button" v-on:click="addresss()" class="am-btn am-btn-success am-radius"
                            >添加地址
                            </button>
                        </p>
                    </div>
                </div>
            </form>
        </div>
    </div>

    {{--添加超级商城会员--}}
    <div class="am-popup am-popup-inner" id="my-popup4">
        <div class="am-popup-hd">
            <h4 class="am-popup-title">添加会员</h4>
            <span data-am-modal-close
                  class="am-close">&times;</span>
        </div>
        <div class="am-popup-bd">
            <form class="am-form tjlanmu">
                <div class="am-form-group am-cf">
                    <div class="zuo">手机号：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="members.phone" placeholder="请输入手机号">
                        <!-- <p class="am-form-help">会员等级</p> -->
                    </div>
                </div>
                <div class="am-form-group am-cf">
                    <div class="zuo">姓名：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="members.user_name" placeholder="请输入姓名">
                        <!-- <p class="am-form-help">密码</p> -->
                    </div>
                </div>
                <div class="am-form-group am-cf">
                    <div class="zuo">推荐人：</div>
                    <div class="you">
                        <input type="text" class="am-form-field" v-model="members.referrer" placeholder="请输入推荐人账号">
                        <!-- <p class="am-form-help">密码</p> -->
                    </div>
                </div>
                <div class="am-form-group am-cf">
                    <div class="zuo">会员等级：</div>
                    <div class="you">
                        <label class="am-checkbox-inline">
                            <input type="radio" value="1" v-model="members.super_level" data-am-ucheck=""
                                   class="am-ucheck-radio">
                            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i
                                        class="am-icon-checked"></i></span>vip
                        </label>
{{--                        <label class="am-checkbox-inline">--}}
{{--                            <input type="radio" value="2" v-model="members.super_level" data-am-ucheck=""--}}
{{--                                   class="am-ucheck-radio">--}}
{{--                            <span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i--}}
{{--                                        class="am-icon-checked"></i></span>导师--}}
{{--                        </label>--}}
                    </div>
                </div>
                <div class="am-form-group am-cf">
                    <div class="you">
                        <p>
                            <button type="button" v-on:click="addSuperUsers()" class="am-btn am-btn-success am-radius">
                                立即添加
                            </button>
                            <button type="reset" class="am-btn am-btn-success am-radius">重新填写</button>

                        </p>
                    </div>
                </div>
            </form>
        </div>

    </div>
    <div class="admin-biaogelist">
        <div class="listbiaoti am-cf">
            <ul class="am-icon-users"> 会员管理</ul>
            <dl class="am-icon-home" style="float: right;">当前位置： 首页 > <a href="#">会员列表</a></dl>
            <dl>
                {{--<button type="button" data-am-modal="{target: '#my-popup'}"--}}
                {{--class="am-btn am-btn-danger am-round am-btn-xs am-icon-plus">--}}
                {{--添加直商城会员--}}
                {{--</button>--}}
                <button type="button" data-am-modal="{target: '#my-popup4'}"
                        class="am-btn am-btn-danger am-round am-btn-xs am-icon-plus">
                    注册会员
                </button>
            </dl>
            <!--这里打开的是新页面-->
        </div>
        <div class="am-btn-toolbars am-btn-toolbar am-kg am-cf">
            <ul>
               <!-- <li>
                    <div class="am-btn-group am-btn-group-xs">
                    <select class="am-input-sm" v-model="keyword.level">
                    <option value="0">会员等级</option>
                    <option v-for="val in levelList" :value="val.id">@{{ val.level_name }}</option>
                    </select>
                    </div>
                    <template>
                        <el-select v-model="keyword.level" placeholder="请选择会员等级">
                            <el-option
                                    size="medium"
                                    v-for="val,index in levelList"
                                    :key="index"
                                    :label="val.level_name"
                                    :value="val.id">
                            </el-option>
                        </el-select>
                    </template>
                </li> -->
               <!-- <li>
                    {{--<div class="am-btn-group am-btn-group-xs">--}}
                    {{--<select class="am-input-sm"  v-model="keyword.company">--}}
                    {{--<option value="0">总公司</option>--}}
                    {{--<option v-for="val in companyList" :value="val.id">@{{ val.name }}</option>--}}
                    {{--</select>--}}
                    {{--</div>--}}
                    <template>
                        <el-select v-model="keyword.company" placeholder="请选择分公司">
                            <el-option
                                    size="medium"
                                    v-for="val,index in companyList"
                                    :key="index"
                                    :label="val.name"
                                    :value="val.id">
                            </el-option>
                        </el-select>
                    </template>
                </li> -->
                <li>
                    <div class="block">
                        <el-date-picker
                                v-model="keyword.endtime"
                                type="datetimerange"
                                value-format="yyyy-MM-dd HH:mm:ss"
                                range-separator="~"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期">
                        </el-date-picker>
                    </div>
                </li>
                {{--<li style="margin-left: -4px;">--}}
                {{--<span class="tubiao am-icon-calendar"></span>--}}
                {{--<input type="text" v-model="keyword.endtime" class="am-form-field am-input-sm am-input-zm  am-icon-calendar" placeholder="开始日期" data-am-datepicker="{theme: 'success',}"  readonly/>--}}
                {{--</li>--}}
                <li>
                    {{--<div class="am-btn-group am-btn-group-xs">--}}
                    {{--<select v-model="keyword.type" class="am-input-sm">--}}
                    {{--<option value="0">类别</option>--}}
                    {{--<option value="1">股东分红</option>--}}
                    {{--<option value="2">禁止登录</option>--}}
                    {{--</select>--}}
                    {{--</div>--}}
{{--                    <template>--}}
{{--                        <el-select v-model="keyword.is_read" placeholder="请选择阅读状态">--}}
{{--                            <el-option--}}
{{--                                    size="medium"--}}
{{--                                    v-for="item in options"--}}
{{--                                    :key="item.value"--}}
{{--                                    :label="item.label"--}}
{{--                                    :value="item.value">--}}
{{--                            </el-option>--}}
{{--                        </el-select>--}}
{{--                    </template>--}}
                    <template>
                        <el-select v-model="keyword.platform_profit" placeholder="请选择分红状态">
                            <el-option
                                    size="medium"
                                    v-for="item in options1"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value">
                            </el-option>
                        </el-select>
                    </template>
                </li>
                <li>
                    <el-input v-model="keyword.phone" class="phone" placeholder="绑定手机号"></el-input>
                </li>
                <li>
                    <el-input v-model="keyword.keyword" class="keywords" placeholder="关键词搜索"></el-input>
                </li>
                <li>
                    <el-button type="primary" v-on:click="changeClick()">搜索</el-button>
                </li>
                {{--<li> <el-button type="success" ><a href="/admin/members/exportUser">导出</a></el-button></li>--}}
                <li>
                    <el-button type="success" v-on:click="exportUser()">导出会员信息</el-button>
                </li>
{{--                <li>--}}
{{--                    <el-button type="danger" v-on:click="resetOrder()">导出份额</el-button>--}}
{{--                </li>--}}
            </ul>
        </div>
        <form class="am-form am-g">
            <table width="100%" class="am-table am-table-bordered am-table-radius am-table-striped">
                <thead>
                <tr class="am-success">
                    <th class="table-check"><input type="checkbox"/></th>
                    <th class="table-id">ID</th>
                    <th class="table-title">会员账号</th>
                    <th class="table-type">姓名</th>
					<th class="table-type">绑定手机号</th>
{{--					<th class="table-type">会员等级</th>--}}
                   <!-- {{--<th class="table-author am-hide-sm-only">会员等级</th>--}} -->
                    <th class="table-author am-hide-sm-only">推荐人</th>
                   <!-- {{--<th class="table-date am-hide-sm-only">接点人</th>--}}
                    {{--<th class="table-date am-hide-sm-only">区域</th>--}} -->
                    <th class="table-date am-hide-sm-only">购物积分</th>
					<th class="table-date am-hide-sm-only">奖金积分</th>
{{--                    <th class="table-date am-hide-sm-only">冻结积分</th>--}}
                    <th class="table-date am-hide-sm-only">复销积分</th>
{{--                     <th class="table-date am-hide-sm-only">e+积分</th>--}}
                    <th class="table-date am-hide-sm-only">贡献值</th>
                    <th class="table-date am-hide-sm-only">直推人数</th>
					<th class="table-date am-hide-sm-only">团队业绩</th>
{{--					<th class="table-date am-hide-sm-only">荣誉级别</th>--}}
{{--					<th class="table-date am-hide-sm-only">业绩阶段</th>--}}
{{--					<th class="table-date am-hide-sm-only">注册等级</th>--}}
					<th class="table-date am-hide-sm-only">个人消费金额</th>
					<th class="table-date am-hide-sm-only">贡献值已分红金额</th>
{{--					<th class="table-date am-hide-sm-only">今日是否观看广告</th>--}}
                    <th class="table-date am-hide-sm-only">最近登录</th>
					<th class="table-date am-hide-sm-only">激活时间</th>
                    <th class="table-date am-hide-sm-only">禁止登陆</th>
                    <th width="130px" class="table-set">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr v-for="val,index in MemberList">
                    <td><input type="checkbox"/></td>
                    <td>@{{ val.uid }}</td>
                    <td>@{{ val.name }}</td>
                    <td>@{{ val.user_name }}</td>
					<td>@{{ val.phone }}</td>
<!--                    {{--<td class="am-hide-sm-only">--}}
                    {{--@{{ val.level_name }}--}}
                    {{--</td>--}} -->
{{--					<td>@{{ val.super_level_name }}</td>--}}
                    <td class="am-hide-sm-only">@{{ val.referrer_phone }}</td>
<!--                    {{--<td class="am-hide-sm-only">@{{ val.nodes_phone }}</td>--}}
                    {{--<td>@{{ val.area }}</td>--}} -->

                   <!-- <td>@{{ val.credit4 }}</td> -->
                    <td>@{{ val.credit1 }}</td>
                    <td>@{{ val.credit2 }}</td>
{{--                    <td>@{{ val.credit3 }}</td>--}}
					<td>@{{ val.credit5 }}</td>
{{--					<td>@{{ val.credit4 }}</td>--}}



					<td>@{{ val.voucher }}</td>
					<td>@{{ val.direct_num }}</td>
{{--					<td>@{{ val.credit3 }}</td>--}}
{{--					<td>@{{ val.by_num }}</td>--}}
					<td>@{{ val.super_team_count }}</td>
{{--					<td>@{{ val.level_name}}</td>--}}
{{--					<td>@{{ val.level_grade}}</td>--}}
{{--                    <td>@{{ val.vip}}</td>--}}
					<td>@{{ val.achievement}}</td>
					<td>@{{ val.consumption_bonus}}</td>
{{--					<td>@{{ val.team_bonus}}</td>--}}
{{--                    <td>--}}
{{--                        <span v-show="val.is_read == 0">否</span>--}}
{{--                        <span v-show="val.is_read == 1">是</span>--}}
{{--                    </td>--}}
                    <td>@{{ val.sign_in }}</td>
					<td>@{{ val.activation_time }}</td>
                    <td>
                        <span v-on:click="editType(val.uid,index)" v-show="val.type == 1" title="正常登陆" style="cursor: pointer;"><i class="am-icon-check"></i></span>
                        <span v-on:click="editType(val.uid)" v-show="val.type == 0" title="已禁用" style="cursor: pointer;"><i class="am-icon-close"></i></span>
                    </td>
                    <td style="width:320px;">
                        <div class="am-btn-toolbar">
                            <div class="am-btn-group am-btn-group-xs">
                                {{--@if(Auth::user()->is_branch ==0)--}}
                                <!-- <a class="am-btn am-btn-primary am-rounds" v-on:click="findsMember(val.uid)" data-am-modal="{target: '#my-popup3'}">充值</a> -->
                                {{--<a class="am-btn am-btn-warning" v-on:click="grilled(val.uid)">扒点</a>--}}
                                {{--@endif--}}
                                <a  v-on:click="findsMember(val.uid)" class="am-btn am-btn-success am-radius" data-am-modal="{target: '#my-popup2', closeViaDimmer: 1, width: 400, height: 800}"
                                    title="修改会员">修改</a>

{{--								 <a v-show="val.super_level < 2"  v-on:click="packTimeted( val.uid, val.credit1, val.credit2, val.voucher )" class="am-btn am-btn-warning am-radius" data-am-modal="{target: '#my-popup6', closeViaDimmer: 1, width: 400, height: 800}"--}}
{{--								    title="报单">升单</a>--}}
{{--                                <a  v-on:click="packTimeted( val.uid, val.credit1, val.credit2, val.voucher )" class="am-btn am-btn-warning am-radius" data-am-modal="{target: '#my-popup6', closeViaDimmer: 1, width: 400, height: 800}"--}}
{{--                                    title="报单">升平台合伙人</a>--}}
                                <a style="background-color: orange;border-color: #4db14d;" class="am-btn am-btn-danger am-radius"  v-on:click="team(val.uid)"  >团队</a>
                                <a class="am-btn am-btn-danger am-radius" v-on:click="resetPass(val.uid)" title="重置密码">重置密码</a>
                                <a class="am-btn am-btn-danger am-radius" v-on:click="resetPay(val.uid)" title="重置支付密码">支付密码</a>
                                {{--<a class="am-btn am-btn-primary am-rounds" v-on:click="findEarning(val.uid)"--}}
                                {{--data-am-modal="{target: '#my-popup10'}">限时购业绩</a>--}}
                                {{--<a class="am-btn am-btn-danger am-radius" v-on:click="openShop(val.uid)" title="重置支付密码">开通超级商城</a>--}}

                                {{--<a class="am-btn am-btn-danger am-radius" v-on:click="del(val.uid)" title="删除会员">删除</a>--}}
                            </div>
                        </div>

                        {{--<div class="am-btn-toolbar" id="credit2_see">--}}
                            {{--<div class="am-btn-group am-btn-group-xs" data-am-modal="{target: '#my-popup5'}" v-on:click="packAge( val.uid, val.credit1, val.credit2, val.voucher )" style="margin-left: 95px;margin-top: 10px;">--}}
                                {{--<a class="am-btn am-btn-success">--}}
                                    {{--<span title="点击购买会场礼包">礼包购买</span>--}}
                                {{--</a>--}}
                            {{--</div>--}}
                        {{--</div>--}}
                        {{--<div class="am-btn-toolbar" id="credit2_see">--}}
                            {{--<div class="am-btn-group am-btn-group-xs"--}}
                                 {{--v-on:click="packTimeted( val.uid, val.credit1, val.credit2, val.voucher )"--}}
                                 {{--style="margin-left: 95px;margin-top: 10px;">--}}
                                {{--<a class="am-btn am-btn-success">--}}
                                    {{--<span title="点击购买">限时购买</span>--}}
                                {{--</a>--}}
                            {{--</div>--}}
                        {{--</div>--}}


                    </td>
                </tr>
                </tbody>
            </table>
            <!--分页-->
            <ul class="am-pagination am-fr">
                <div class="block">
                    <el-pagination
                            background
                            :page-size="PagesData.per_page"
                            :current-page = "PagesData.current_page"
                            layout="total , prev, pager, next"
                            :total="PagesData.total"
                            @prev-click="changeClick"
                            @next-click="changeClick"
                            @current-change="changeClick">
                    </el-pagination>
                </div>
            </ul>
			<div>
				暂未参与分红总消费份额:<span class="am-badge am-badge-danger am-radius">@{{ credit1 }}&nbsp;&nbsp;&nbsp;&nbsp;</span>
                暂未参与分红总团队份额:<span class="am-badge am-badge-danger am-radius">@{{ credit2 }}&nbsp;&nbsp;&nbsp;&nbsp;</span>
				暂未参与分红总人数:<span class="am-badge am-badge-danger am-radius">@{{ credit5 }}</span>
			</div>
        </form>
        <script src="{{ URL::asset('js/address/distpicker.data.js') }}"></script>
        <script src="{{ URL::asset('js/address/distpicker.js') }}"></script>
        <script src="{{ URL::asset('js/address/main.js') }}"></script>
        <script src="{{ URL::asset('js/nzh/nzh.js') }}"></script>
        <script>
            var app = new Vue({
                el: "#app",
                data: {
					credit1:'',
					credit2:'',
					credit5:'',
                    addressNum: '',
                    value2: true,
                    value3: true,
                    value4: true, //DT股东
                    value5:true,
                    timeDataArray:[], //限时购所有商品
                    timeData:{
                        goodsname:'',
                        id:'',
                        originalprice:'',
                        weight:''
                    }, //限时购选中商品
                    pickSelf: 0, //是否自提 0 否 1是 -限时购
                    num: 0,  //面膜数量-限时购
                    price: 0,  //单价-限时购
                    freights:'', //限时购运费
                    timeTed: { //收货地址 限时购
                        remark: '',
                        address: '',

                    },
                    timeTedData: [],
                    earningNum: '',
                    earningDnum: '',
                    options: [/*{
                        value: '1',
                        label: '股东分红'
                    }, */{
                        value: '1',
                        label: '是'
                    }, {
                        value: '0',
                        label: '否'
                    // }, {
                    //     value: '4',
                    //     label: '最近登录'
                    }/*, {
                        value: '5',
                        label: 'DT股东'
                    }*/],
                    options1: [/*{
                        value: '1',
                        label: '股东分红'
                    }, */{
                        value: '1',
                        label: '是'
                    }, {
                        value: '0',
                        label: '否'
                        // }, {
                        //     value: '4',
                        //     label: '最近登录'
                    }/*, {
                        value: '5',
                        label: 'DT股东'
                    }*/],
                    pickerOptions2: {
                        shortcuts: [{
                            text: '最近一周',
                            onClick(picker) {
                                const end = new Date();
                                const start = new Date();
                                start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                                picker.$emit('pick', [start, end]);
                            }
                        }, {
                            text: '最近一个月',
                            onClick(picker) {
                                const end = new Date();
                                const start = new Date();
                                start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                                picker.$emit('pick', [start, end]);
                            }
                        }, {
                            text: '最近三个月',
                            onClick(picker) {
                                const end = new Date();
                                const start = new Date();
                                start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                                picker.$emit('pick', [start, end]);
                            }
                        }]
                    },

                    MemberList : [], //会员列表
                    memberDetail:[],
                    packAgeData:[],//会场礼包
                    memberAllAdress:[],//会员地址信息
                    packagePayAll:'',//礼包支付总金额
                    packageMemberprice:'', //礼包商品加个
                    thisMembercredit1:'',//当前会员可用电子币余额
                    thisMembercredit2:'',//当前会员可用奖金币余额
                    thisMembervoucher:'',//当前会员可用代金券余额
                    thisMemberUid:'',//当前点击的用户uid
                    isFullMoney:0,//余额是否足够,0为不足够(默认),1为足够
                    status:0,//支付状态
                    //商城等级
                    MemberLeve:[],
                    MicroMall:[],
                    ExShop:[],
                    PagesData:[],//分页
                    pase:'',
                    members:{
                        phone:'',
                        password:'',
                        repasswprd:'',
                        password_pay:'666666',
                        referrer:'',
                        nodes:'',
                        type:'1',
                        area:'A',
                        company_id:0,
                        note:0,
                        user_name:''
                    },
                    memberDetail:{  //用户详情
                        phone:'',
                        voucher:'',
                        is_shift:'',
						team_profit:'',
						platform_profit:'',
                        registered:'',
                        isdown:'',
                        is_withdraw:'',
                        user_name:'',
                        credit1:'',
                        credit2:'',
                        credit4:'',
                        name:'',
                        level:'',
                        level_super:'',
                        tiny_level:'',
                        super_level:'',
						by_num:'',
                        is_read:'',
                    },

                    memberPrepay: { //显示余额
                        credit1: '',
                        credit2: '',
                        credit4: '',
                        credit6: '',
                        voucher: '',
                        remark: ''
                    },

                    companyList:[], //公司列表
                    levelList:{}, // 会员等级列表
                    keyword:{
                        platform_profit:'',
                        is_read:'',
                        endtime:'',
                        keyword:'',
                        phone:'',
                    },//关键字搜索
                    uid: '',
                    flag: false,
                    address: {
                        'phone': '', //手机
                        'name': '',  //姓名
                        'province': '',  //省
                        'city': '',  //市
                        'district': '', //区
                        'address': '',  //详细地址
                        // 'default':true,
                    },
                    DTshareholderData:{
                        cancelDT: 0,
                    }
                },
                computed: {
                    freight: function () {
                        var freight = 0
                        if (this.pickSelf == 1 || this.num==0) {
                            freight = 0
                        } else if (this.num * this.timeData.weight <= 1) {
                            freight = 10
                        } else {
                            freight = 10 + (Math.ceil(this.num * this.timeData.weight) - 1) * 5
                        }
                        return freight
                    },
                    Zcredit1: function () {
                        var nzhcn = Nzh.cn
                        return nzhcn.encodeB(this.memberPrepay.credit1)
                    },
                    Zcredit2: function () {
                        var nzhcn = Nzh.cn
                        return nzhcn.encodeB(this.memberPrepay.credit2)
                    },
                    Zcredit4: function () {
                        var nzhcn = Nzh.cn
                        return nzhcn.encodeB(this.memberPrepay.credit4)
                    },
                    Zcredit6: function () {
                        var nzhcn = Nzh.cn
                        return nzhcn.encodeB(this.memberPrepay.credit6)
                    },
                    Zvoucher: function () {
                        var nzhcn = Nzh.cn
                        return nzhcn.encodeB(this.memberPrepay.voucher)
                    }
                },
                //事件
                methods: {
                    team:function (uid) {
                        window.location.href="/admin/members/myPartners?uid="+uid;
                    },
                    //添加收货地址
                    timeAddress(num) {
                        this.addressNum = num
                        // var openTarget = "#my-popup" + num
                        // // $(openTarget).modal('close')
                        $('#my-popup7').modal('open')

                        this.address = {
                            'phone': '', //手机
                            'name': '',  //姓名
                            'province': '',  //省
                            'city': '',  //市
                            'district': '', //区
                            'address': '',  //详细地址
                        }
                    },
                    addresss() {
                        // var openTarget = "#my-popup" + this.addressNum
                        for (item in this.address) {
                            if (!this.address[item]) {
                                layer.msg('请正确填写信息')
                                return false
                            }

                        }
                        if(!(/^1[3456789]\d{9}$/.test(this.address.phone))){
                            layer.msg('请填写正确的手机号')
                            return false;
                        }
                        app.address.uid = app.uid
                        $.post("/admin/members/buyMask", {
                            '_token': '{{csrf_token()}}',
                            class: 'addAddress',
                            data: app.address
                        }, function (res) {
                            if (res.code) {
                                $.post("/admin/members/buyMask", {
                                    '_token': '{{csrf_token()}}',
                                    class: 'address',
                                    uid: app.uid
                                }, function (res) {
                                    if (res.code) {
                                        app.timeTedData = res.data;
                                        app.memberAllAdress = res.data
                                        $('#my-popup7').modal('close')
                                    } else {
                                        layer.msg(res.data);
                                    }
                                });
                            } else {
                                layer.msg(res.data, {
                                    end: function () {
                                        app.flag = false
                                    }
                                });
                            }
                        });
                    },
                    addAddress(uid) {
                        app.address = {
                            'phone': '', //手机
                            'name': '',  //姓名
                            'province': '',  //省
                            'city': '',  //市
                            'district': '', //区
                            'address': '',  //详细地址
                        }
                        app.uid = uid
                    },
                    //购买限时购面膜
                    timeBuy() {

                        // if(!this.num || !this.timeData) {
                        //     layer.msg('请填写必要信息')
                        //     return false
                        // }
                        if (!app.timeTed.address) {
                            layer.msg('请选择收获地址')
                            return false
                        }
                        if (app.flag) return false
                        app.flag = true
                        var freight = app.freights===''?app.freight:app.freights
                        $.post("/admin/members/buyMask", {
                            '_token': '{{csrf_token()}}',
                            class: 'pay',
                            uid: this.uid,
                            number: this.num,
                            is_self: this.pickSelf,
                            addressId: app.timeTed.address,
                            remark: this.timeTed.remark,
                            data:this.timeData,
                            freight:freight
                        }, function (res) {
                            if (res.code) {
                                location.reload()
                                layer.msg(res.data, {
                                    end: function () {
                                        app.flag = false
                                    }
                                });
                            } else {
                                layer.msg(res.data, {
                                    end: function () {
                                        app.flag = false
                                    }
                                });
                            }
                        });
                    },
                    //购买面膜
                    packTimeted(uid) {
                        this.uid = uid
                        this.timeDataArray = ''
                        this.timeData = ''
                        app.timeTed.address = this.timeTedData = this.timeTed.remark = ''
                        app.num = 0
                        app.pickSelf = 0
                        $.post("/admin/members/buyMask", {
                            '_token': '{{csrf_token()}}',
                            class: 'address',
                            uid: uid
                        }, function (res) {
                            if (res.code) {
                                app.timeTedData = res.data;
                                $('#my-popup6').modal('open')
                            } else {
                                $('#my-popup6').modal('open')
                            }
                        });
                        $.post("/admin/members/buyMask", {
                            '_token': '{{csrf_token()}}',
                            class: 'getGoods',
                        }, function (res) {
                            if (res.code) {
                                app.timeDataArray = res.data;
                            } else {
                            }
                        });
                    },
                    {{--//生产订单--}}
                    {{--addTimeted:function(){--}}
                    {{--    $.post("/admin/members/buyMask", {'_token': '{{csrf_token()}}', class: 'add',uid:this.uid,number:this.num,is_self:this.pickSelf,addressId:app.addressId}, function (res) {--}}
                    {{--        if (res.code) {--}}
                    {{--            console.log(res.data)--}}
                    {{--            app.timetedPrice = res.rico.data;--}}
                    {{--            app.timetedDD = res.price--}}
                    {{--        } else {--}}
                    {{--            layer.msg(res.data);--}}
                    {{--        }--}}
                    {{--    });--}}
                    {{--},--}}
                    {{--selectNum:function() {--}}
                    {{--  this.addTimeted()--}}
                    {{--},--}}

                    //选择当前页
                    changeClick:function(e){
                        var rico = this
                        $.get("/admin/members/member",{'_token':'{{csrf_token()}}',class:'select',page:e,keyword:app.keyword},function (res) {
                            if(res.code){
                                app.MemberList = res.data.data
                                for(var i=0;app.MemberList.length>i;i++){
                                    app.MemberList[i].enroll_time = rico.formatDateTime(app.MemberList[i].enroll_time)
                                    app.MemberList[i].activation_time = rico.formatDateTime(app.MemberList[i].activation_time)
                                    app.MemberList[i].sign_in = rico.formatDateTime(app.MemberList[i].sign_in)

                                }
                                app.PagesData = res.data
								app.credit1 = res.credit1
								app.credit2 = res.credit2
								app.credit5 = res.credit5
                            } else {
                                layer.msg(res.data);
                            }
                        });
                    },
                    initialize:function () {
                        var rico = this
                        //用户列表
                        $.get("/admin/members/member",{'_token':'{{csrf_token()}}',class:'select'},function (res) {
                            if(res.code){
                                app.MemberList = res.data.data
                                for(var i=0;app.MemberList.length>i;i++){
                                    app.MemberList[i].enroll_time = rico.formatDateTime(app.MemberList[i].enroll_time)
                                    app.MemberList[i].activation_time = rico.formatDateTime(app.MemberList[i].activation_time)
                                    app.MemberList[i].sign_in = rico.formatDateTime(app.MemberList[i].sign_in)

                                }
                                app.pase = res.data.current_page;
                                app.PagesData = res.data
								app.credit1 = res.credit1
								app.credit2 = res.credit2
								app.credit5 = res.credit5
                                console.log(app.MemberList);
                            } else {
                                layer.msg(res.data);
                            }
                        });
                    },

                    //添加会员
                    addUsers:function () {
                        $.post("/admin/members/member",{'_token':'{{csrf_token()}}',class:'add',members:app.members},function (res) {
                            if(res.code){
                                layer.msg(res.data,{icon: 6},function () {
                                    location.reload();
                                },500);
                            } else {
                                layer.msg(res.data);
                            }
                        });
                    },
                    //重置门店编号
                    storeDel:function (e){
                        layer.load(2);
                        $.post("/admin/members/member",{'_token':'{{csrf_token()}}',uid:e,class:'delstore'},function (res) {
                            layer.closeAll('loading');
                            if(res.code){
                                layer.msg(res.data);
                            } else {
                                layer.msg(res.data);
                            }
                        });
                    },
                    //查出礼包信息及会员地址信息
                    packAge:function ( e, b, c, g ){
                        layer.load(2);
                        $.post("/admin/members/member",{'_token':'{{csrf_token()}}',uid:e,class:'package'},function (res) {
                            layer.closeAll('loading');
                            if(res.code){
                                $("#packRemark").val('');
                                app.thisMembercredit1 = b;
                                app.uid = e;
                                app.thisMemberUid = e;
                                app.thisMembercredit2 = c;
                                app.thisMembervoucher = g;
                                app.packAgeData = res.data.packAgeData;
                                app.memberAllAdress = res.data.memberAllAdress;
                                app.packagePayAll = res.data.packagePayAll;
                                app.packageMemberprice = res.data.packAgeData.memberprice
                                if ( res.data.MembersPayFor == 1 ) {
                                    app.isFullMoney = 1;
                                } else {
                                    app.isFullMoney = 0;
                                }
                            } else {
                                layer.msg(res.data);
                            }
                        });
                    },
                    //购买大礼包操作
                    packageBuy:function(){
                        if ( app.isFullMoney == 0 ) {
                            layer.msg('余额不足!');
                            return false;
                        }
                        var packRemark = $("#packRemark").val();
                        var addressid = $("input[name='default']:checked").val();
                        if( addressid == undefined ){
                            layer.msg('请选择收货地址!');
                            return false;
                        }
                        if(app.status == 0) {
                            app.status = 1;
                            layer.msg('支付中', {
                                icon: 16
                                , shade: 0.01
                            });
                            $.post("/admin/members/member", {
                                '_token': '{{csrf_token()}}',
                                class:'packageBuy',
                                goodsid:app.packAgeData.id,
                                uid: app.thisMemberUid,
                                addressid: addressid,
                                remark:packRemark,
                                price: app.packAgeData.memberprice,
                                freight: app.packAgeData.freight,
                                is_self:app.pickSelf
                            }, function (res) {
                                layer.closeAll('loading');
                                if (res.code) {
                                    layer.msg(res.data, {time: 500}, function () {
                                        location.reload();
                                        return false;
                                    });
                                } else {
                                    app.status = 0;
                                    layer.msg(res.data);
                                    return false;
                                }
                            });
                        }else {
                            layer.msg('支付中..');
                            return false;
                        }
                    },
                    //开通超级商城
                    openShop:function (id) {
                        layer.load(2);
                        $.post("/admin/members/openshop",{'_token':'{{csrf_token()}}',id:id},function (res) {
                            layer.closeAll('loading');
                            if(res.code){
                                // layer.alert('直推人数：'+res.data.super_recommend+'<br/>' +
                                //     '大区业绩:'+res.data.big_num_money+'<br/>' +
                                //     '小区业绩:'+res.data.counts_money)
                                // app.data = res.data;
                                res.data,{icon: 6}
                            } else {
                                layer.msg(res.data);
                            }
                        });
                    },
                    //添加超级商城会员
                    addSuperUsers:function () {
                        if(!(/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(app.members.phone))){
                            layer.msg('请输入正确的电话号码');
                            return false;
                        }
                        if(app.members.user_name == ''){
                            layer.msg('请输入用户姓名');
                            return false;
                        }
                        if(!(/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(app.members.referrer))){
                            layer.msg('请输入正确的推荐人账号');
                            return false;
                        }
                        $.post("/admin/members/member",{'_token':'{{csrf_token()}}',class:'addSuperUsers',members:app.members},function (res) {
                            if(res.code){
                                layer.msg(res.data);
                                $("#my-popup4").modal("close");
                                location.reload();
                            } else {
                                layer.msg(res.data);
                            }
                        });
                    },
                    formatDateTime:function (timeStamp) {
                        var date = new Date();
                        date.setTime(timeStamp * 1000);
                        var y = date.getFullYear();
                        var m = date.getMonth() + 1;
                        m = m < 10 ? ('0' + m) : m;
                        var d = date.getDate();
                        d = d < 10 ? ('0' + d) : d;
                        var h = date.getHours();
                        h = h < 10 ? ('0' + h) : h;
                        var minute = date.getMinutes();
                        var second = date.getSeconds();
                        minute = minute < 10 ? ('0' + minute) : minute;
                        second = second < 10 ? ('0' + second) : second;
                        return y + '-' + m + '-' + d+' '+h+':'+minute+':'+second;
                    },
                    //修改会员状态
                    editType:function (id) {
                        layer.confirm('确定要修改吗', {
                            btn: ['确定','取消'] //按钮
                        }, function(){
                            $.post("/admin/members/member",{'_token':'{{csrf_token()}}',class:'editType',uid:id},function (res) {
                                if(res.code){
                                    layer.msg(res.data,{icon: 6},function () {
                                        // location.reload();
                                    },500);
                                }
                            });
                        })
                    },
                    //股东
                    isShareholder: function (id) {
                        layer.confirm('确定要修改吗', {
                            btn: ['确定', '取消'] //按钮
                        }, function () {
                            $.post("/admin/members/member", {
                                '_token': '{{csrf_token()}}',
                                class: 'isShareholder',
                                uid: id
                            }, function (res) {
                                if (res.code) {
                                    layer.msg(res.data, {icon: 6}, function () {
                                        location.reload();
                                    }, 500);
                                } else {
                                    layer.msg(res.data);
                                }
                            });
                        })
                    },
                    isDt: function (id) {
                        layer.confirm('确定要修改吗', {
                            btn: ['确定', '取消'] //按钮
                        }, function () {
                            $.post("/admin/members/member", {
                                '_token': '{{csrf_token()}}',
                                class: 'DT_shareholder',
                                uid: id
                            }, function (res) {
                                if (res.code) {
                                    layer.msg(res.data, {icon: 6}, function () {
                                        location.reload();
                                    }, 500);
                                } else {
                                    layer.msg(res.data);
                                }
                            });
                        })
                    },
                    //扒点
                    grilled:function(id,i){
                        $.post("/admin/members/member",{'_token':'{{csrf_token()}}',class:'finds',uid:id},function (ress) {
                            if(ress.code){
                                // app. grilledDetail = ress.data
                            } else {
                                layer.msg(ress.data);
                            }

                            //prompt层
                            layer.prompt({title: '扒点设置:', formType: 3,value: ress.data.grilled}, function(text, index){
                                layer.close(index);
                                $.post("/admin/members/member",{'_token':'{{csrf_token()}}',class:'setGrilled',uid:id,Datas:{grilled:text}},function (res) {

                                    if(res.code){
                                        layer.msg(res.data,{time:600},function () {
                                            location.reload();
                                        },500);
                                    } else {
                                        layer.msg(res.data);
                                    }
                                });
                            })
                        });

                    },

                    //修改会员资料
                    editMember:function (id) {
                        $.post("/admin/members/member",{'_token':'{{csrf_token()}}',class:'edit',uid:id,
						memberDetail:app.memberDetail},function (res) {
                            if(res.code){
                                layer.msg(res.data,{icon: 6},function () {
                                    location.reload();
                                },500);
                            } else {
                                layer.msg(res.data);
                            }
                        });
                    },
                    //充值货币
                    addRepay: function (id) {
                        if (app.flag) return false
                        app.flag = true
                        $.post("/admin/members/member", {
                            '_token': '{{csrf_token()}}',
                            class: 'addRepay',
                            uid: id,
                            memberPrepay: app.memberPrepay
                        }, function (res) {
                            if (res.code) {
                                location.reload()
                                layer.msg(res.data, {
                                    end: function () {
                                        app.flag = false
                                    }
                                });
                            } else {
                                layer.msg(res.data,{
                                    end:function () {
                                        app.flag = false
                                    }
                                });
                            }
                        });
                    },

                    //减少货币
                    minusRepay: function (id) {
                        if (app.flag) return false
                        app.flag = true
                        $.post("/admin/members/member", {
                            '_token': '{{csrf_token()}}',
                            class: 'minusRepay',
                            uid: id,
                            memberPrepay: app.memberPrepay
                        }, function (res) {
                            if (res.code) {
                                location.reload()
                                layer.msg(res.data, {
                                    end: function () {
                                        app.flag = false
                                    }
                                });
                            } else {
                                layer.msg(res.data,{
                                    end:function () {
                                        app.flag = false
                                    }
                                });
                            }
                        });
                    },
                    //查找会员资料
                    findsMember:function (id) {
                        $.post("/admin/members/member",{'_token':'{{csrf_token()}}',class:'finds',uid:id},function (res) {
                            if(res.code){
                                app.memberDetail = res.data
                                app.MemberLeve = res.MemberLeve;
                                app.MicroMall = res.MicroMall;
                                app.ExShop = res.ExShop;
                                if (res.data.straight_shop_isdown == 1) {
                                    app.value2 = true;
                                } else {
                                    app.value2 = false;
                                }
                                if(res.data.isdown == 1){
                                    app.value3 = true;
                                } else {
                                    app.value3 = false;
                                }
                                if(res.data.super_shop_isdown==1){
                                    app.value5 = false;
                                }else{
                                    app.value5=true;
                                }
                            } else {
                                layer.msg(res.data);
                            }
                        });
                    },
                    //修改直商城开关
                    changeStraightShop:function (id) {
                        layer.confirm('修改下面所有的会员', {
                            btn: ['确定','取消'] //按钮
                        }, function(){
                            if(app.value2){
                                var straight_shop_isdown = 1;
                            } else {
                                var straight_shop_isdown = 2;
                            }
                            layer.msg('加载中', {
                                icon: 16
                                ,shade: 0.01
                            });
                            $.post("/admin/members/member",{'_token':'{{csrf_token()}}',class:'straight_shop_isdown',uid:id,straight_shop_isdown:straight_shop_isdown},function (res) {
                                layer.closeAll('loading');
                                if(res.code){
                                    layer.msg(res.data,{time: 500},function () {
                                        location.reload();
                                    },500);
                                } else {
                                    layer.msg(res.data);
                                }
                            });
                        })
                    },
                    //修改超级商城开关
                    changeIsdown:function (id) {
                        layer.confirm('修改下面所有的会员', {
                            btn: ['确定','取消'] //按钮
                        }, function(){
                            if(app.value3){
                                var isdown = 1;
                            } else {
                                var isdown = 2;
                            }
                            layer.msg('加载中', {
                                icon: 16
                                ,shade: 0.01
                            });
                            $.post("/admin/members/member",{'_token':'{{csrf_token()}}',class:'isdown',uid:id,isdown:isdown},function (res) {
                                layer.closeAll('loading');
                                // console.log(res)
                                if(res.code){
                                    layer.msg(res.data,{time: 500},function () {
                                        location.reload();
                                    },500);
                                } else {
                                    layer.msg(res.data);
                                }
                            });
                        })
                    },
                    // 修改
                    changeSuper:function (id) {
                        layer.confirm('修改下面所有的会员', {
                            btn: ['确定','取消'] //按钮
                        }, function(){
                            if(app.value5){
                                var typeisdown = 0;
                            } else {
                                var typeisdown = 1;
                            }
                            layer.msg('加载中', {
                                icon: 16
                                ,shade: 0.01
                            });
                            $.post("/admin/members/member",{'_token':'{{csrf_token()}}',class:'super_shop_isdown',uid:id,type:typeisdown},function (res) {
                                layer.closeAll('loading');
                                console.log(res)
                                if(res.code){
                                    console.log(res)
                                    layer.msg(res.data,{time: 500},function () {
                                        location.reload();
                                    },500);
                                } else {
                                    layer.msg(res.data);
                                }
                            });
                        })
                    },
                    //限时购业绩
                    findEarning:function(uid){
                        $.post("/admin/members/getTotal", {
                            '_token': '{{csrf_token()}}',
                            uid: uid
                        }, function (res) {
                            if (res.code) {
                                //console.log(res.data.dnum)
                                app.earningNum = res.data.num
                                app.earningDnum = res.data.dnum
                            } else {
                                layer.msg(res.data);
                            }
                        });
                    },
                    //重置密码
                    resetPass: function(id) {
                        layer.confirm('确定重置密码？', {
                            btn: ['确定','取消'] //按钮
                        }, function(){
                            $.post("/admin/members/member",{'_token':'{{csrf_token()}}',class:'resetPass',uid:id,Usertype:1},function (res) {
                                if(res.code){
                                    layer.msg(res.data,{time: 500},function () {
                                    },500);
                                } else {
                                    layer.msg(res.data);
                                }
                            });
                        })
                    },
                    //重置支付密码
                    resetPay: function(id) {
                        layer.confirm('确定重置密码？', {
                            btn: ['确定','取消'] //按钮
                        }, function(){
                            $.post("/admin/members/member",{'_token':'{{csrf_token()}}',class:'resetPass',uid:id,Usertype:2},function (res) {
                                if(res.code){
                                    layer.msg(res.data,{time: 500},function () {
                                    },500);
                                } else {
                                    layer.msg(res.data);
                                }
                            });
                        })
                    },
                    //删除
                    del:function (id,index) {
                        $.post("/admin/members/member",{'_token':'{{csrf_token()}}',class:'delete',uid:id},function (res) {
                            if(res.code){
                                app.MemberList.splice(index,1)
                            } else {
                                layer.msg(res.data);
                            }
                        });
                    },
                    exportUser:function(){
                        location.href="/admin/members/exportUser?platform_profit="+app.keyword.platform_profit+'&is_read='+app.keyword.is_read+'&endtime='+app.keyword.endtime+'&keyword='+app.keyword.keyword+'&phone='+app.keyword.phone;
                    },
                    //重置
                    resetOrder:function(){
                        // location.reload();
                        location.href="/admin/members/exportShare?platform_profit="+app.keyword.platform_profit+'&is_read='+app.keyword.is_read+'&endtime='+app.keyword.endtime+'&keyword='+app.keyword.keyword+'&phone='+app.keyword.phone;

                    }
                },

                //自动执行
                mounted: function () {
                    this.initialize();//分公司
                },
            })
        </script>
@include('Admin.public.foot')